package com.jinghua.treatment.service.impl;

import com.jinghua.treatment.entity.SysSleep;
import com.jinghua.treatment.mapper.SysSleepMapper;
import com.jinghua.treatment.service.SysSleepService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 睡眠情绪情况业务接口实现类
 * Created by 王兴光 on 2018/3/26.
 */
@Service("sleepService")
public class SysSleepServiceImpl implements SysSleepService {

    @Resource
    private SysSleepMapper sleepMapper;

    @Override
    public SysSleep selectByPrimaryKey(Integer sleepId) {
        return sleepMapper.selectByPrimaryKey(sleepId);
    }

    @Override
    @Transactional
    public int insert(SysSleep record) {
        return sleepMapper.insert(record);
    }

    @Override
    @Transactional
    public int updateByPrimaryKey(SysSleep record) {
        return sleepMapper.updateByPrimaryKey(record);
    }
}
